// import CryptoJS from 'crypto-js'

function getRandomInt (min, max) {
  return Math.floor(Math.random() * (max - min + 1)) + min
}

const countryMap = [ 'CHINA', 'JAPAN', 'AMAERICA', 'TAILAND', 'SOUTH KOREA', 'SINGAPORE', 'MALAYSIA', 'CAMBODIA', 'VIETNAM', 'INDIA' ]
function randomCountry (str) {
  // const hashcode = parseInt(CryptoJS.SHA256(str).toString().slice(0,8), 16)
  // return countryMap[hashcode % 10]
  return countryMap[getRandomInt(0, 9)]
}

export {
  randomCountry
}